<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <div th:fragment="blog-list-fragment" class="am-u-lg-8 am-u-sm-12">
        <main class="articles-list">
            <th:block th:if="${null != blogPageResult}">
                <th:block th:each="blog,iterStat:${blogPageResult.list}">
                    <article class="am-g blog-entry-article">
                        <div class="am-u-lg-6 am-u-lg-12 am-u-sm-12 blog-entry-text post-preview">
                            <div class="topic-header">
                                <div class="pull-left">
                                    <div class="blog-flex-center">
                                        <div class="blog-flex0">
                                            <img th:src="@{${configurations.get('yourAvatar')}}"
                                                 class="link avatar avatar-image"/>
                                        </div>
                                        <div class="author-lockup blog-flex1">
                                            <a class="link" href="javascript:"
                                               th:text="${configurations.get('yourName')}"></a>
                                            <span class="category-name">
                                                <a class="category-name" rel="tag"
                                                   th:href="@{'/category/' + ${blog.blogCategoryName}}"
                                                   th:utext="${blog.blogCategoryName}">
                                                </a>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <span class="pull-right time pc_time"
                                      th:text="${#dates.format(blog.createTime, 'yyyy-MM-dd')}"></span>
                            </div>

                            <h1 class="post-index-title">
                                <a itemtype="url" th:href="@{'/blog/' + ${blog.blogId}}">
                                    <th:block th:text="${blog.blogTitle}"/>
                                </a>
                            </h1>
                            <div class="post-content-preview article-body">
                                <a th:href="@{'/blog/' + ${blog.blogId}}">
                                    <!-- <img th:src="@{${blog.blogCoverImage}}"> -->
                                </a>
                            </div>
                            <div class="clearfix topic-footer">
                                    <span class="pull-left time mobile_time"
                                          th:text="${#dates.format(blog.createTime, 'yyyy-MM-dd')}"></span>
                            </div>
                        </div>
                    </article>
                </th:block>
                <br/>
                <th:block th:if="${blogPageResult.pages > 1}">
                    <div style="text-align: center">
                        <div id="pagination" class="pagination">
                            <input id="total" type="hidden" th:value="${blogPageResult.total}"/>
                            <input id="pageSize" type="hidden" th:value="${blogPageResult.pageSize}">/
                            <input id="pageNum" type="hidden" th:value="${blogPageResult.pageNum - 1}"/>
                            <input id="target" type="hidden" value="page/"/>
                        </div>
                    </div>
                </th:block>
            </th:block>
        </main>
    </div>
</html>